package java7_24;

import java.util.ArrayList;
import java.util.HashMap;

public class Function5 {	
	public static void main(String[] args) {
		HashMap<Integer,Integer> map= new HashMap<Integer, Integer>();
		int[][] arr={{1,2,3},{4,5,3,2}};
		ArrayList<Integer> list=new ArrayList<>();
		for(int[] i:arr){
			for(int j:i){
				list.add(j);
			}
		}
		list.stream().map(new Function5()::method(t,map) )
		System.out.println(map);
	} 
	public void method(int num,HashMap<Integer, Integer> map){
		if(map.containsKey(num)){
			int temp=map.get(num);
			map.put(num, temp+1);
		}else{
			map.put(num, 1);
		}
	}
}
